const schemas = {
  "addTestData": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          }
        },
        "required": [
          "optResult"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "getListData": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          },
          "totalDataCount": {
            "type": "number",
            "description": "总记录数"
          },
          "dataset": {
            "type": "array",
            "description": "当前方案中该用例的测试数据列表",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "数据ID，对应Mongo主键"
                },
                "data": {
                  "type": "object",
                  "description": "一条测试数据"
                }
              },
              "required": [
                "id",
                "data"
              ]
            }
          }
        },
        "required": [
          "optResult",
          "totalDataCount",
          "dataset"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "deleteTestData": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          }
        },
        "required": [
          "optResult"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "editTestData": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          }
        },
        "required": [
          "optResult"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "importDataDoc": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          }
        },
        "required": [
          "optResult"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "exportDataDoc": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          },
          "file": {
            "type": "string",
            "description": "需要导入的模版csv文件"
          }
        },
        "required": [
          "optResult",
          "file"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "getDataTemplate": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          },
          "template": {
            "type": "array",
            "description": "用例的数据集模版信息",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "数据项的名称"
                },
                "datatype": {
                  "type": "string",
                  "description": "数据类型，可取值：\ninteger – 整型\nfloat – 浮点型\nstring – 字符串"
                },
                "comment": {
                  "type": "string",
                  "description": "数据项的描述"
                }
              },
              "required": [
                "name",
                "datatype"
              ]
            }
          }
        },
        "required": [
          "optResult",
          "template"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "addDataVariable": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          }
        },
        "required": [
          "optResult"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "deleteDataVariable": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          }
        },
        "required": [
          "optResult"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "importCSV": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          }
        },
        "required": [
          "optResult"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "exportCSV": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          },
          "file": {
            "type": "string",
            "description": "需要导入的模版csv文件"
          }
        },
        "required": [
          "optResult",
          "file"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "getRules": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          },
          "rules": {
            "type": "array",
            "description": "用例中不同参数的自动生成数据规则",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "数据项的名称"
                },
                "datatype": {
                  "type": "string",
                  "description": "数据类型，可取值：\ninteger – 整型\nfloat – 浮点型\nstring – 字符串"
                },
                "ruleType": {
                  "type": "string",
                  "description": "规则类型，可取值：\nfix – 定值\nset – 集合\nrandstr – 随机字符串\nrandnum – 随机数\nstepnum – 其他数字规则即步进"
                },
                "value": {
                  "type": "string",
                  "description": "ruleType=fix/set时有效"
                },
                "randStrRule": {
                  "description": "randstr类型的规则细节",
                  "type": "object",
                  "properties": {
                    "len": {
                      "type": "number",
                      "description": "字串长度"
                    },
                    "hasCapital": {
                      "type": "number",
                      "description": "是否包含大写字母，取值：0-不包含，1-包含"
                    },
                    "hasLower": {
                      "type": "number",
                      "description": "是否包含小写字母，取值：0-不包含，1-包含"
                    },
                    "hasNum": {
                      "type": "number",
                      "description": "是否包含数字，取值：0-不包含，1-包含"
                    },
                    "otherChar": {
                      "type": "number",
                      "description": "是否包含其他符号字符，取值：0-不包含，1-包含"
                    }
                  },
                  "required": [
                    "len",
                    "hasCapital",
                    "hasLower",
                    "hasNum",
                    "otherChar"
                  ]
                },
                "numRule": {
                  "description": "randnum和stepnum类型的规则细节",
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "规则类型，取值：othernum – 其他数字生成规则"
                    },
                    "min": {
                      "type": "string",
                      "description": "最小值，整型和浮点型都有可能，故用string"
                    },
                    "max": {
                      "type": "string",
                      "description": "最大值，整型和浮点型都有可能，故用string"
                    },
                    "iterval": {
                      "type": "string",
                      "description": "步进值，整型和浮点型都有可能，故用string"
                    }
                  },
                  "required": [
                    "type",
                    "min",
                    "max",
                    "iterval"
                  ]
                }
              },
              "required": [
                "name",
                "datatype",
                "ruleType"
              ]
            }
          }
        },
        "required": [
          "optResult",
          "rules"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "editRules": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          }
        },
        "required": [
          "optResult"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  }
}

export default schemas;
